<?php $this->load->view('left'); ?>
<input type="hidden" name="b_id" id="b_id" value="<?php echo $msg['b_id']?>" />
<table>
  <tr>
    <td width="68" height="40">App Id :</td>
    <td width="133"><?php echo $msg['pid']?></td>
    <td width="102">Book Name :</td>
    <td width="295"><?php echo $msg['bn']?></td>
    <td width="184" rowspan="4" style="vertical-align:middle;"><img style="width:150px;height:200px;" src="<?php echo $msg['bip']?>" /></td>
  </tr>
  <tr>
    <td height="40">Price :</td>
    <td><?php echo $msg['pc']?></td>
    <td>Author :</td>
    <td><?php echo $msg['au']?></td>
  </tr>
  <tr>
    <td height="40">ISBN :</td>
    <td><?php echo $msg['isbn']?></td>
    <td>Publisher :</td>
    <td><?php echo $msg['pn']?></td>
  </tr>
  <tr>
    <td id="pub" height="40">Pub Date :</td>
    <td><?php echo $msg['pd']?></td>
    <td>Star :</td>
    <td><?php echo $msg['star']?></td>
  </tr>
  <tr>
    <td height="40" >Dir Path:</td>
    <td colspan="4"><?php echo $msg['cp']?></td>
  </tr>
   <tr>
    <td height="40" >Book Path:</td>
    <td colspan="4"><?php echo $msg['bp']?></td>
  </tr>
   <tr>
    <td height="40" colspan="5" >Book Describe</td>
  </tr>
   <tr>
    <td height="300" colspan="5" ><?php echo $msg['bd']?></td>
  </tr>
  <tr>
    <td height="40" colspan="5" >Book Comments</td>
  </tr>
  <?php
  if($com_num>0)
  {
          foreach ($com as $comment)
          {
                  echo "<tr><td>Star:</td><td>";
                  for($i=1;$i<=$comment['level'];$i++)
                  {
                        echo "<img src=\"images/star_red.gif\" />";
                  }
                  echo "</td><td>Date:</td><td>";
                  echo $comment['date'];
                  echo "</td><td>Operation:</td></tr>";
                  echo "<tr><td colspan=\"4\">";
                  echo $comment['comment'];
                  echo "</td><td>";
                  echo "<a href=\"".site_url('manage/del_comment').'/'.$comment['prod_id'].'/'.$msg['b_id'].'/'.$comment['evaluate_id']."\">"."Delete"."</a>";
                  echo "</td></tr>";
          }
          if($com_num>10)
          {
                echo "<tr><td height=\"40\" colspan=\"5\" align=\"right\"><a href=\"".site_url('manage/more_comments').'/'.$comment['prod_id']."\">More Comments</a></td></tr>";
          }
  }
  else
  {
        echo "<tr><td height=\"40\" colspan=\"5\" align=\"left\">No Comments</td></tr>";
  }

  ?>
</table>
<?php if ($msg['sid'] == 0) { ?>
<br/>
<br/>
<h2>Sub Books</h2>
<div id="title1">
<a href="<?php echo site_url('welcome/upload_pdf/'.$msg['b_id']);?>" > Add New Sub Book </a>
</div>
<table>
<tr><td>App ID</td><td>Book Name</a></td><td>Author</td><td>Publisher</td><td>Pub Date</td><td>Price</td><td>Cover</td><td>Delete</td></tr>
<?php
$b_id=$msg['b_id'];
foreach ($sub_books as $msg)
{
        echo "<tr><td>".$msg['prod_id']."</td><td><a target=\"_blank\" href=\"".site_url('manage/get_book_message/'.$msg['b_id'])."\">".$msg['name']."</a></td><td>".$msg['author']."</td><td>".$msg['publisher']."</td><td>".$msg['pub_date']."</td><td>".$msg['price']."</td><td><img width='150px' height='150px' src=\"".base_url().$msg['pic']."\" /></td><td>"."<a href=\"".site_url('manage/edit_book/'.$msg['b_id'])."\">Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;"."<a href=\"".site_url('manage/del_sub_book/'.$b_id.'/'.$msg['b_id'])."\">Delete</a></td></tr>";
}
?>
</table>
          <?php } ?>

<?php $this->load->view('right'); ?>
<style type="text/css">

#title1  a{

        display:block;

        float:left;

        color:white;

        width:210px;

        height:37px;

    font-size:14px;

        font-weight:bold;

        text-align:center;

        padding-top:8px;

        background:url(images/bg-menu-item-green.gif) no-repeat;

        margin-bottom:50px;

}

table{

        clear:both;

}

</style>

